package sensorLAN.UIServidor;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import javax.swing.JDialog;

public class OyenteTeclasPresionadas extends KeyAdapter {
	private JDialog ventana;
	
	public OyenteTeclasPresionadas(JDialog ventana){
		this.ventana= ventana;
	}
	
	@Override
	public void keyReleased(KeyEvent e) {
		System.err.println("Cerar???????????????????????????????");
		if(e.getKeyCode() == KeyEvent.VK_ESCAPE){
    	   System.err.println("Cerrrarrrrrrrrrrrrrrrrrrrrrrrr");
    	   ventana.dispose();
       } else {
    	      System.err.println("not escaped");
       }
    }
}
